import { memo } from 'react';

import useCanvasStore from './store/useCanvasStore';
import { Provider } from './store';

const CanvasProvider: React.FC<{ children?: React.ReactNode }> = ({ children }) => {
  const store = useCanvasStore();
  return <Provider value={store}>{children}</Provider>;
};

export default memo(CanvasProvider);
